package com.zhijian.medical.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * 实验类型
 *
 * @author HCG
 * @version 1.0
 * @date 2022/8/9
 */
@AllArgsConstructor
@Getter
public enum ExperimentTypeEnum {

    PCR(1, "荧光PCR", Arrays.asList("KRAS", "NRAS", "BRAF", "高危HPV", "JAK2", "肺癌5种", "PIK3CA", "新冠病毒")),
    SANGER(2, "一代测序", Arrays.asList("C-KIT", "PGDGFR")),
    NGS(3, "二代测序", Arrays.asList("人40", "人425")),
    FISH(4, "FISH检测", Arrays.asList("乳腺癌HER2", "EWS1", "BCL2", "IHG1/CCND1")),
    JYXP(5, "基因芯片", Collections.emptyList()),
    ZLYM(6, "肿瘤药敏", Collections.emptyList()),
    HSZP(7, "核酸质谱", Collections.emptyList());

    private Integer code;
    private String desc;
    private List<String> project;

    public static ExperimentTypeEnum getByCode(Integer code) {
        ExperimentTypeEnum[] values = ExperimentTypeEnum.values();
        for (ExperimentTypeEnum anEnum : values) {
            if (anEnum.getCode().equals(code)) {
                return anEnum;
            }
        }
        return null;
    }
}
